import styles from './index.module.less';
import Nav from './Nav';
import Content from './Content';
import Footer from './Footer';
import useChange from '@/hooks/useChange';
import { BrowserRouter } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import { blogAdminUrl } from '@/assets/image/cdn/image';

const Home: React.FC<any> = () => {
  const [state, setState] = useChange(zhCN);
  return (
    <ConfigProvider locale={state}>
      <BrowserRouter>
        <div
          className={styles.home_box}
          style={{ backgroundImage: `url(${blogAdminUrl})` }}
        >
          <Nav setState={setState} />
          <Content />
          <Footer />
        </div>
      </BrowserRouter>
    </ConfigProvider>
  );
};

export default Home;
